package com.dcy.znoa.common.enums;

/**
 * Created by pengyu on 2017/10/6.
 */
public enum ApplyAuditCode {
    //申请类型 1 请假 2 出差 3 外勤 9 申述
    NotDo(0, "未审核"),
    Yes(1, "通过"),
    No(2, "未通过");

    private Integer code;
    private String msg;

    private ApplyAuditCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static  String getMsgByCode(Integer code) {
        if(code==null){return null;}
        switch (code.intValue()) {
            case 0:
                return NotDo.getMsg();
            case 1:
                return Yes.getMsg();
            case 2:
                return No.getMsg();
            default:
                return null;
        }
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public static  void main(String args[]){
        System.out.println(getMsgByCode(2));

    }

}

